1. Technical Field to which the Invention Pertains
The present invention relates to a method and apparatus for reducing multi-bit image data which method and apparatus thin input multi-bit image data at a predetermined thinning ratio, binarize the thinned multi-bit image data, and output the binarized image data.
2. Description of the Related Art
In a fax, digital copier, or image scanner, in general, image data are input by use of an optical system and a sensor, which are of the highest available resolution in order to guarantee a resolution necessary for image output, and data reduction processing is performed in order to attain a desired resolution. For example, in the case of a G4 fax, image data are input at 400 dpi, and in order to transmit the image data to a G3 fax, the image data are converted to image data of 200 dpi. In the course of such data conversion, there is carried out processing such as thinning input pixels at an even ratio in accordance with the number of output pixels.
FIG. 7 is a diagram showing thinning according to a prior art technique. After being latched, input pixels are thinned on the basis of a main scan thinning pattern. The main scan thinning pattern is a ½ thinning pattern for removing, for example, all odd-numbered pixels. The thinned pixels are again latched, and thinned on the basis of a sub scan thinning pattern in order to output the tinned pixels as output pixels. The sub scan thinning pattern is a ½ thinning pattern for removing, for example, all odd-numbered lines.
However, when a thin line is present at a location where thinning is effected, the line is lost. In the case of an original sheet of paper on which a frame is described by means of score lines, when a boundary line is lost, an image differing from an image that a sender intended to send is transmitted as information.
In the case of document filing or OCR, image data are generally stored at about 200 dpi or 240 dpi, irrespective of data quantity. However, an image scanner to be used for data input is required to have a resolution of 400 dpi or higher, because fine input is needed in some cases. Therefore, such an image scanner is designed to have an optical resolution of 400 dpi or 600 dpi; and obtained data are reduced to a desired resolution by means of computing processing, and then output.
In a conventional fax, data reduction is generally performed after binarization. In relation thereto, various methods, such as an SPC method, a logical sum method, a projection method, a high-speed projection method, and a nine-division method, have been reported. However, these methods follow the stream of analog faxes and were used in the era in which the common practice was to directly binarize an analog signal by use of a comparator. Presently, the common practice is to quantize an analog signal to multi values by use of an A/D converter, and then perform binarization digitally. In particular, in the case where pseudo intermediate gradation processing, such as dithering, is performed, when magnification is changed after binarization, image quality deteriorates greatly. However, such a problem does not occur when such magnification change is performed at a stage in which data are in the form of multi-level signals. Therefore, it has become common practice to perform magnification change processing at a stage in which data are in the form of multi-level signals.
When magnification change is performed for data in the form of multi-level signals, for main scanning, a method for simply thinning pixels or averaging the values of adjacent pixels to thereby reduce the size of data is employed, because this method is simple. For sub scanning, the transport speed of a document feeder or the moving speed of an optical system (in the case of a flat bed type) is increased in order to reduce of the size of data. However, in such a case, since fine setting of resolution is difficult, thinning is generally combined with the above control.
However, mere thinning causes loss of thin lines. Further, when averaging is performed, the density of a thin line is averaged with that of a background image, with the result that the thin line disappears when the reduction ratio is high.
In order to solve such drawbacks, there have been devised various methods for preventing loss of a thin line through advance recognition of the thin line. However, these methods involve practical problems, such as the necessity for large memory or the necessity for high processing speed. Further, there has been employed a simple method in which pixels to be removed are changed randomly during each thinning period in order to prevent complete loss of a thin line. However, in this case, a thin line formed by thinned pixels is unnaturally, locally biased rightward and leftward or is interrupted, and a problem occurs when the image is recognized.
FIGS. 8A and 8B are diagrams for explaining a problem that occurs when thinning is simply performed. In an original image that has not yet been subjected to thinning shown in FIG. 8A, a straight line whose width corresponds to a single pixel is present in the third line. When this image is thinned by means of a width-scanning ½ thinning, as shown in FIG. 8B, the straight line in the third line is removed, so that the thin line is lost.
FIGS. 9A to 9C are diagrams for explaining a problem that occurs when random thinning is performed. In an original image shown in FIG. 9A, a straight line whose width corresponds to a single pixel extends along a vertical direction. FIG. 9C shows a result of removal of to-be-removed pixels shown in FIG. 9B. When pixels to be removed are randomly changed line by line, complete loss of a thin line can be prevented. However, there may occur a phenomenon in which the thin line assumes the shape of a broken line, or a phenomenon in which the straight line is locally biased rightward and leftward.